/*
 *    Copyright (c) 2018-2025, proj All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * Neither the name of the proj developer nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 * Author: proj
 */

package com.ykht.proj.coupon.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ykht.proj.coupon.entity.FxWithdrawal;
import com.ykht.proj.coupon.vo.FxWithdrawalVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 提现记录表
 *
 * @author proj code generator
 * @date 2021-02-01 19:00:17
 */
@Mapper
public interface FxWithdrawalMapper extends BaseMapper<FxWithdrawal> {
	/**
	 * 提现记录 分页查询(服务员，门店 ，品牌，公司)
	 * @param page
	 * @param req
	 * @return
	 */
    IPage<FxWithdrawalVo> getWithdrawalListPage(Page page,@Param("req") FxWithdrawalVo req);

	/**
	 * 提现记录详情 的统计
	 * @param req
	 * @return
	 */
	FxWithdrawalVo getWithdrawalDetailsCount(@Param("req") FxWithdrawalVo req);

	/**
	 * 提现记录详情列表分页
	 * @param page
	 * @param req
	 * @return
	 */
	IPage<FxWithdrawalVo> getWithdrawalDetailsListPage(Page page, @Param("req")  FxWithdrawalVo req);

	/**
	 * 根据选择的角色 获取已经提现的佣金金额
	 * @param req
	 * @return
	 */
    FxWithdrawalVo getSumByMoneyCount(@Param("req") FxWithdrawalVo req);

	/**
	 * 获取服务员可提现金额和已提现金额
	 * @param req
	 * @return
	 */
	FxWithdrawalVo getWaiterWithdrawalCount(@Param("req") FxWithdrawalVo req);

	/**
	 * 提现记录详情列表分页 的 详情明细（提现流水）
	 * @param page
	 * @param batchNumber
	 * @return
	 */
	IPage<FxWithdrawalVo> getWithdrawalDetailsInDetailsListPage(Page page, @Param("batchNumber") String batchNumber);

	/**
	 * 获取服务员提现记录
	 * @param page
	 * @param fxWithdrawalVo
	 * @return
	 */
    IPage<FxWithdrawalVo> getWaiterWithdrawalListPage(Page page, @Param("req") FxWithdrawalVo fxWithdrawalVo);
}
